1. Field of the Invention
This invention relates to computer systems, and more particularly to the initialization of services in an application server, such as for Java™-based server applications.
2. Description of the Related Art
An application server is generally a program executing on a computer in a distributed application network that provides services for one or more application programs. The application server is frequently viewed as part of a three-tier application, including a user interface tier, an application tier (business logic), and a backend tier (database, transactional systems, legacy systems, etc.). The first tier may provide a Web browser-based interface to the user, usually at a personal computer or workstation. In the middle-tier, the application server may provide numerous services to a business logic application or set of applications, possibly executing on a local area network or intranet computer. An application server may include a web server providing Internet and web-based services. In the third or back-end tier, database and transaction servers, often executing on a mainframe or large computer, provide data needed by the business logic applications.
The application server may provide services that are commonly required by business logic applications. Many of these services may be called as functions from the application code without the need for each application programmer to implement them explicitly within the code. Examples of services made available to applications by an application server may include mail services, transaction services, asynchronous messaging, database connectivity, naming and directory services, and security and authentication services. In general, the more services made available to applications as part of an application server, the easier it may be to implement business logic applications.
However, the startup time of an application server typically increases as more services are added due to the need to initialize each service. For example, network services such as HTTP, IIOP, RMI/JRMP, etc. typically initialize themselves at application server startup and open server sockets to listen for requests from clients. The initialization of these services frequently adds significantly to memory usage and startup time for the application server even though some of these network services may not be used by clients. In applications where high availability is important, it may be beneficial to have a short startup or restart time for application servers.
One way to address this concern might be to customize each service in an application server for delayed initialization. Each individual service might be augmented to include a lazy initialization component to delay initialization of the service until a request is received for the service. This requires customization for each service and increases the complexity of service development and the addition of additional services to the application server.